Skip to content

Conversation

@vincmarks
Copy link

Changes

  • Added example script geo_data.jl that shows how to use GeophysicalModelGenerator to load real topography and use it for simulations in TrixiBottomTopography.

Testing

  • Code runs successfully locally
  • All simulations produce expected results

Notes

  • Ci.yml: Success

  • FormatCheck.yml: Failure

  • Documenter.yml: Failure

  • Looking for feedback on:

    • how to fix the errors to also pass FormatCheck.yml and Documenter.yml

@vincmarks
Copy link
Author

Changes

  • Added the functions geo_topo_impression and create_topography_data to generate arbitrary topography data. For this, the functionalities of GeophysicalModelGenerator are used.

  • Added the functions convert_geo_1d and convert_geo_2d to convert the topography data (from geo_topo_impression and create_topography_data) into the format required by TrixiBottomTopography.

  • Added the file create_convert_data_geo.jl in which the functions convert_geo_1d and convert_geo_2d are used to generate the topography data (geo.xyz) and convert it properly (rhine_data_1d_20_x_geo.txt, rhine_data_1d_20_y_geo.txt, rhine_data_2d_20_geo.txt). There is also a Markdown file create_convert_geo_data.md in which the used functions are explained.

  • Added the files trixishallowwater_dam_break_1D_geo_data.jl and trixishallowwater_dam_break_2D_geo_data.jl which consider a dam break scenario. These files essentially replicate trixishallowwater_dam_break_1D and trixishallowwater_dam_break_2D but now with the topography data generated from create_convert_data_geo.jl. One difference is the use of a different mesh type due to the rectangular shape of the domain in the trixishallowwater_dam_break_2D_geo_data.jl file. Here, a P4est mesh is used and the solution is visualized in ParaView.

@vincmarks vincmarks marked this pull request as ready for review August 7, 2025 13:46
Copy link
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I will take a look at this. Could you please restore files that do not need to change in this PR? For example, the .JuliaFormatter.toml file is deleted and some random files have been reformatted but not changed otherwise.

@@ -0,0 +1,214 @@
# Create and convert real topography data
In this section, it is explained how to get real topography data using GeophysicalModelGenerator.jl and make it accessible to TrixiBottomTopography. The necessary structure of the data for TrixiBottomTopography is explained in the `docs/src/conversion.md` file. In the file `docs/src/trixishallowwater_jl_geo_data_examples`, it is then explained how to properly run simulations with this data. In the following, we will consider the example file `create_convert_data_geo.jl`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add links to Julia packages and add the .jl part to them, e.g.,

Suggested change
In this section, it is explained how to get real topography data using GeophysicalModelGenerator.jl and make it accessible to TrixiBottomTopography. The necessary structure of the data for TrixiBottomTopography is explained in the `docs/src/conversion.md` file. In the file `docs/src/trixishallowwater_jl_geo_data_examples`, it is then explained how to properly run simulations with this data. In the following, we will consider the example file `create_convert_data_geo.jl`.
In this section, it is explained how to get real topography data using [GeophysicalModelGenerator.jl](https://github.com/JuliaGeodynamics/GeophysicalModelGenerator.jl) and make it accessible to [TrixiBottomTopography.jl](https://github.com/trixi-framework/TrixiBottomTopography.jl).
The necessary structure of the data for [TrixiBottomTopography.jl](https://github.com/trixi-framework/TrixiBottomTopography.jl) is explained in the `docs/src/conversion.md` file. In the file `docs/src/trixishallowwater_jl_geo_data_examples`, it is then explained how to properly run simulations with this data. In the following, we will consider the example file `create_convert_data_geo.jl`.

Could you please also update references to other doc files to real Documenter.jl/Markdown references that will be rendered as HTML links in the online docs?

Comment on lines +17 to +26
```julia
# Get a first impression of the topography data
Topo, p, Topo_Cart = geo_topo_impression(
resolution="@earth_relief_01s",
lon_min=6.963880,
lon_max=6.978499,
lat_min=50.947861,
lat_max=50.957095
)
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the examples you demonstrate here do not run forever, could you please turn them into Documenter.jl named @example blocks so that they will be executed when building the online docs to ensure that everything still works?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to load such huge files into the git repository?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants